# Maintainer:
pkgname=fcitx5-rime
pkgver=5.1.0
pkgrel=0
pkgdesc="librime input method support for fcitx5"
url="https://github.com/fcitx/fcitx5-rime"
# armhf: extra-cmake-modules
arch="all !armhf"
license="GPL-3.0-or-later"
makedepends="
	cmake
	extra-cmake-modules
	gettext-dev
	fcitx5-dev
	fcitx5-qt-dev
	librime-dev
	qt5-qttools-dev
	samurai
	"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/fcitx/fcitx5-rime/archive/refs/tags/$pkgver.tar.gz"
options="!check" # no tests

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
616437a190d54b3f95f69ea6b732357d5594679aa30e9346856c27d90f0e15b339346067d7b5a9e3acfb7846e785628ca3ef72e82648342117264e1750d0cb85  fcitx5-rime-5.1.0.tar.gz
"
